<%--
  DO COMPUTING (CONTROLLER)
  User: PING
  Date: 2022/9/7
  Time: 9:50
  QQ:   26078437
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java"
        import="com.javaweb.common.DBUtil"
        import="com.javaweb.common.StringTool"
        import="com.javaweb.common.DispatcherTool"%>

<html>
<meta charset="UTF-8">
<head>
    <title></title>
</head>
<body>
    <%
        // process the request from login UI
        request.setCharacterEncoding("UTF-8");
        // decode the name
        String name = StringTool.URLDecodeInUTF(request.getParameter("name")) ;
        // do update by DBUtil
        DBUtil.updateVote(name);
        // redirect to
        //http://localhost:8080/01_jspBasics/01/jspbasic/voteProcess.jsp?name=%E5%BC%A0%E4%B8%89
        request.getRequestDispatcher("show.jsp").forward(request, response);
        //response.sendRedirect("show.jsp");
        //  show.jsp
    %>
</body>
</html>
